import { http } from '@/utils/http/axios';

/** ======================字典类型 ===================== */

/**
 * @description: 字典类型列表
 */
export function dictTypeList(params) {
  return http.request({
    url: '/dictType/list',
    method: 'get',
    params,
  });
}

/**
 * @description: 添加字典类型
 */
export function addDictType(params) {
  return http.request({
    url: '/dictType/add',
    method: 'post',
    params,
  });
}

/**
 * @description: 编辑字典类型
 */
export function editDictType(params) {
  return http.request({
    url: '/dictType/edit',
    method: 'post',
    params,
  });
}

/**
 * @description: 删除字典类型
 */
export function delDictType(params) {
  return http.request({
    url: '/dictType/delete',
    method: 'post',
    params,
  });
}

/** ======================字典项===================== */

/**
 * @description: 添加字典项
 */
export function addDictData(params) {
  return http.request({
    url: '/dictData/add',
    method: 'post',
    params,
  });
}

/**
 * @description: 编辑字典项
 */
export function editDictData(params) {
  return http.request({
    url: '/dictData/edit',
    method: 'post',
    params,
  });
}

/**
 * @description: 删除字典项
 */
export function delDictData(params) {
  return http.request({
    url: '/dictData/delete',
    method: 'post',
    params,
  });
}

/**
 * @description: 字典项列表
 */
export function dictDataList(params) {
  return http.request({
    url: '/dictData/list',
    method: 'get',
    params,
  });
}
